<template>
    <view class="page">
        <water-mark :meta="meta"></water-mark>
        <view>
            <rich-text class="content" :nodes="richContentStr"></rich-text>
        </view>
    </view>
</template>

<script>
    import SearchService from '@/services/search/index'
    const searchService = new SearchService()
    import mixins from '@/mixins/index';
    import {richContent} from '@/utils/index';
	import {mapMutations} from 'vuex';
    export default {
        mixins:[mixins],
        data(){
            return {
                richContentStr:''
            }
        },
		methods:{
			...mapMutations({
				setAscriptionPage:'msgStore/setAscriptionPage'
			}),
		},
        onLoad({id,ascription}) {
			this.setAscriptionPage({
				 ascriptionPage:ascription
			});
            searchService.searchDetail(id).then(response=>{
                if(response.success){
                    const {introduce,title} = response.result;
                    const content = richContent(introduce);
                    this.richContentStr = content;
                }else{

                }
            })
        }
    }
</script>

<style lang="scss" scoped>
    .page{
        padding-left: 20upx;
        padding-right: 20upx;
		margin-left: 30upx;
		margin-right: 30upx;
    }
    .content{
        // padding: 20upx;
        font-size: 14px;
    }
</style>
